import type { RouteRecordRaw } from 'vue-router';
import RouterView from '@/layout/routerView/index.vue';

const moduleName = 'administrative-penalty';

const routes: Array<RouteRecordRaw> = [
  {
    path: '/administrative-penalty',
    redirect: { name: `/${moduleName}-archive-query` },
    component: RouterView,
    meta: {
      title: '行政处罚',
      icon: 'icon-zhuomian',
      hideInMenu: true,
    },
    children: [
      {
        path: 'spot-punishment',
        name: `${moduleName}-spot-punishment`,
        meta: {
          title: '当场处罚',
        },
        component: () => import('@/views/administrative-penalty/spot-punishment/index.vue'),
      },
      {
        path: 'registers',
        name: `${moduleName}-registers`,
        component: () =>
          import('@/views/administrative-penalty/spot-punishment/registers/index.vue'),
        meta: { title: '立案', hideInMenu: true, activeMenu: `${moduleName}-spot-punishment` },
      },
      {
        path: 'spotView',
        name: `${moduleName}-spotView`,
        component: () =>
          import('@/views/administrative-penalty/spot-punishment/spotView/index.vue'),
        meta: { title: '查看', hideInMenu: true, activeMenu: `${moduleName}-spot-punishment` },
      },
      {
        path: 'spotHandle',
        name: `${moduleName}-spotHandle`,
        component: () =>
          import('@/views/administrative-penalty/spot-punishment/spotHandle/index.vue'),
        meta: { title: '处理', hideInMenu: true, activeMenu: `${moduleName}-spot-punishment` },
      },
      {
        path: 'case-management',
        name: `${moduleName}-case-management`,
        meta: {
          title: '一般程序',
        },
        component: () => import('@/views/administrative-penalty/case-management/index.vue'),
      },
      {
        path: 'register',
        name: `${moduleName}-register`,
        component: () =>
          import('@/views/administrative-penalty/case-management/register/index.vue'),
        meta: { title: '立案', hideInMenu: true, activeMenu: `${moduleName}-case-management` },
      },
      {
        path: 'caseView',
        name: `${moduleName}-caseView`,
        component: () =>
          import('@/views/administrative-penalty/case-management/caseView/index.vue'),
        meta: { title: '查看', hideInMenu: true, activeMenu: `${moduleName}-case-management` },
      },
      {
        path: 'caseHandle',
        name: `${moduleName}-caseHandle`,
        component: () =>
          import('@/views/administrative-penalty/case-management/caseHandle/index.vue'),
        meta: { title: '处理', hideInMenu: true, activeMenu: `${moduleName}-case-management` },
      },
      {
        path: 'termination',
        name: `${moduleName}-termination`,
        component: () =>
          import('@/views/administrative-penalty/case-management/termination/index.vue'),
        meta: {
          title: '申请案件终止',
          hideInMenu: true,
          activeMenu: `${moduleName}-case-management`,
        },
      },
      {
        path: 'case-approval',
        name: `${moduleName}-case-approval`,
        meta: {
          title: '案件审批',
        },
        component: () => import('@/views/administrative-penalty/case-approval/index.vue'),
      },
      {
        path: 'examine',
        name: `${moduleName}-examine`,
        component: () => import('@/views/administrative-penalty/case-approval/examine/index.vue'),
        meta: { title: '审批', hideInMenu: true, activeMenu: `${moduleName}-case-approval` },
      },
      {
        path: 'examineView',
        name: `${moduleName}-examineView`,
        component: () =>
          import('@/views/administrative-penalty/case-approval/examineView/index.vue'),
        meta: { title: '查看', hideInMenu: true, activeMenu: `${moduleName}-case-approval` },
      },
      {
        path: 'archive-query',
        name: `${moduleName}-archive-query`,
        meta: {
          title: '档案查询',
        },
        component: () => import('@/views/administrative-penalty/archive-query/index.vue'),
      },
      {
        path: 'volumeView',
        name: `${moduleName}-volumeView`,
        component: () =>
          import('@/views/administrative-penalty/archive-query/volumeView/index.vue'),
        meta: { title: '查看卷宗', hideInMenu: true, activeMenu: `${moduleName}-archive-query` },
      },
    ],
  },
];

export default routes;
